package com.eastfair.projectcore.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import com.eastfair.annotation.model.EchoVO;

/**
 * <p>
 * 实体类
 * 电子橱窗点位表
 * </p>
 *
 * @author ligang
 * @since 2021-08-09
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("c_hot_image_point")
@ApiModel(value = "HotImagePoint", description = "电子橱窗点位表")
@AllArgsConstructor
public class HotImagePoint extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 点位序号
     */
    @ApiModelProperty(value = "点位序号")
    @TableField(value = "point_index")
    @Excel(name = "点位序号")
    private Integer pointIndex;

    /**
     * 点位x坐标
     */
    @ApiModelProperty(value = "点位x坐标")
    @NotNull(message = "请填写点位x坐标")
    @TableField(value = "cdn_x")
    @Excel(name = "点位x坐标")
    private Integer cdnX;

    /**
     * 点位y坐标
     */
    @ApiModelProperty(value = "点位y坐标")
    @NotNull(message = "请填写点位y坐标")
    @TableField(value = "cdn_y")
    @Excel(name = "点位y坐标")
    private Integer cdnY;

    /**
     * 关联产品id
     */
    @ApiModelProperty(value = "关联产品id")
    @TableField(value = "product_id")
    @Excel(name = "关联产品id")
    private Long productId;

    /**
     * 展商id
     */
    @ApiModelProperty(value = "展商id")
    @TableField(value = "exhibitor_id")
    @Excel(name = "展商id")
    private Long exhibitorId;

    /**
     * 展会id
     */
    @ApiModelProperty(value = "展会id")
    @TableField(value = "exhibition_id")
    @Excel(name = "展会id")
    private Long exhibitionId;

    /**
     * 关联热图id
     */
    @ApiModelProperty(value = "关联热图id")
    @NotNull(message = "请填写关联热图id")
    @TableField(value = "hot_image_id")
    @Excel(name = "关联热图id")
    private Long hotImageId;

    /**
     * 是否生效(默认1：可用 0:不可用)
     */
    @ApiModelProperty(value = "是否生效(默认1：可用 0:不可用)")
    @TableField(value = "enabled")
    @Excel(name = "是否生效(默认1：可用 0:不可用)")
    private Integer enabled;

    /**
     * 是否删除(默认0：未删除 1:已删除)
     */
    @ApiModelProperty(value = "是否删除(默认0：未删除 1:已删除)")
    @TableField(value = "deleted")
    @Excel(name = "是否删除(默认0：未删除 1:已删除)")
    private Integer deleted;


    @Builder
    public HotImagePoint(Long id, LocalDateTime createTime, Long createdBy, LocalDateTime updateTime, Long updatedBy, 
                    Integer pointIndex, Integer cdnX, Integer cdnY, Long productId, Long exhibitorId, 
                    Long exhibitionId, Long hotImageId, Integer enabled, Integer deleted) {
        this.id = id;
        this.createTime = createTime;
        this.createdBy = createdBy;
        this.updateTime = updateTime;
        this.updatedBy = updatedBy;
        this.pointIndex = pointIndex;
        this.cdnX = cdnX;
        this.cdnY = cdnY;
        this.productId = productId;
        this.exhibitorId = exhibitorId;
        this.exhibitionId = exhibitionId;
        this.hotImageId = hotImageId;
        this.enabled = enabled;
        this.deleted = deleted;
    }

}
